﻿#ifndef QUANTITYANALYSIS_H
#define QUANTITYANALYSIS_H

#include <QObject>
#include "jsonutils.h"

struct QuantityItem
{
    double Intensity;
    double Concentration;
};

class QuantityItemList:public QList<QuantityItem>
{
public:
    QString Element;
    double WaveLength;

    static QuantityItemList Parase(QString fileName)
    {
        QJsonObject obj;
        QuantityItemList ret;
        JsonUtils::LoadJsonObject(fileName,obj);
        ret.Element=obj["Element"].toString();
        ret.WaveLength=obj["WaveLength"].toDouble();

        QJsonArray arr=obj["Items"].toArray();
        for(auto item:arr)
        {
            QJsonObject itemObj=item.toObject();
        }
    }
};

class QuantityAnalysis : public QObject
{
    Q_OBJECT
public:
    explicit QuantityAnalysis(QObject *parent = nullptr);

signals:

public slots:
};

#endif // QUANTITYANALYSIS_H
